home *** CD-ROM | disk | FTP | other *** search
/ Strategy Challenges Collection / Strategy Challenges Collection.iso / pc / demo / demodata / menu.dxr / 00081.ls < prev    next >
Encoding:
Text File  |  1996-10-02  |  1.3 KB  |  50 lines

  1. on enterFrame
  2.   global gBeenThere, gVoiceFlag
  3.   if gBeenThere = 0 then
  4.     repeat with nn = 3 to 7
  5.       puppetSprite(nn, 1)
  6.     end repeat
  7.     if gVoiceFlag = 0 then
  8.       puppetSound("SubMain.aif")
  9.       set gVoiceFlag to 1
  10.     end if
  11.     set gBeenThere to 1
  12.   end if
  13. end
  14.  
  15. on exitFrame
  16.   timeOutCheck()
  17.   go(the frame)
  18. end
  19.  
  20. on SubmenuRoll
  21.   if the mouseCast > 1 then
  22.     set tempName to the name of cast the mouseCast
  23.     if tempName contains "_Roll" then
  24.       nothing()
  25.     else
  26.       repeat with nn = 3 to 7
  27.         if the castNum of sprite nn < 1 then
  28.           next repeat
  29.         end if
  30.         if the name of cast the castNum of sprite nn contains "_Roll" then
  31.           set tempOld to the name of cast the castNum of sprite nn
  32.           set tempOld to chars(tempOld, 1, length(tempOld) - 5)
  33.           set the castNum of sprite nn to the number of member tempOld
  34.           exit repeat
  35.         end if
  36.       end repeat
  37.       repeat with nn = 3 to 7
  38.         if the castNum of sprite nn < 1 then
  39.           next repeat
  40.         end if
  41.         if the name of cast the castNum of sprite nn = tempName then
  42.           set the castNum of sprite nn to the number of member (tempName & "_Roll")
  43.           exit repeat
  44.         end if
  45.       end repeat
  46.     end if
  47.   end if
  48.   updateStage()
  49. end
  50.